Skip to content

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Sep 29, 2025

@mjbvz mjbvz added this to the October 2025 milestone Sep 29, 2025
@mjbvz mjbvz self-assigned this Sep 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the GitHub repository tool to use the "metis" service by refactoring the GithubAvailableEmbeddingTypesManager into a proper dependency injection service pattern. The change introduces a service interface and registers it with the DI container to improve code organization and testability.

Key changes:

  • Converts GithubAvailableEmbeddingTypesManager to a proper service with interface
  • Updates all consumers to use dependency injection instead of manual instantiation
  • Adds proper service registration in both production and test environments

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/platform/workspaceChunkSearch/common/githubAvailableEmbeddingTypes.ts Creates service interface and renames class to follow service pattern
src/platform/workspaceChunkSearch/node/workspaceChunkSearchService.ts Updates to use injected service instead of manual instantiation
src/platform/urlChunkSearch/node/urlChunkEmbeddingsIndex.ts Adds service injection and updates embedding computation calls
src/platform/embeddings/common/embeddingsComputer.ts Extracts EmbeddingInputType to a named type
src/extension/tools/node/githubRepoTool.tsx Updates to use injected service instead of lazy instantiation
src/extension/extension/vscode-node/services.ts Registers the new service in the DI container
test/base/simulationContext.ts Adds service registration for test environment

@IRunCommandExecutionService _commandService: IRunCommandExecutionService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IGithubCodeSearchService private readonly _githubCodeSearch: IGithubCodeSearchService,
@IGithubAvailableEmbeddingTypesService private readonly _availableEmbeddingTypesManager: Lazy<GithubAvailableEmbeddingTypesService>,
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter type annotation is incorrect. It should be IGithubAvailableEmbeddingTypesService not Lazy<GithubAvailableEmbeddingTypesService> since the service is now injected directly through DI rather than being lazy-loaded.

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjbvz yeah, actually this is interesting. Intentional?

Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

TylerLeonhardt
TylerLeonhardt previously approved these changes Sep 29, 2025
Copy link

⚠️ This PR originates from a fork. Due to security restrictions, pipelines from forks are no longer triggered automatically. Learn more.

If the changes appear safe, you can manually trigger the pipeline by commenting /AzurePipelines run.

@mjbvz mjbvz added this pull request to the merge queue Oct 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 6, 2025
@mjbvz mjbvz added this pull request to the merge queue Oct 6, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 6, 2025
* Update fetch tool to use metis

microsoft/vscode#268956

* Add service dep for tests to

* Use mock service for tests

* Fix lazy
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 6, 2025
@TylerLeonhardt TylerLeonhardt reopened this Oct 6, 2025
@TylerLeonhardt TylerLeonhardt added this pull request to the merge queue Oct 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 6, 2025
auto-merge was automatically disabled October 6, 2025 22:29

Pull request was closed

@TylerLeonhardt TylerLeonhardt reopened this Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update fetch tool to use metis
3 participants